<admintpl file="header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a>入职管理</a></li>
	</ul>
	<form class="well form-search" method="post" action="{:U('EntryManager/index')}">
		企业名称：
		<input type="text" name="com_name" style="width: 100px;" value="{$formget.com_name|default=''}" placeholder="请输入企业名称">
		社招人名称：
		<input type="text" name="invite_name" style="width: 100px;" value="{$formget.invite_name|default=''}" placeholder="请输入社招人名称">
		入职状态：
		{$job_state}
		录入时间:
		<input type="text" name="created_time" class="js-date" value="{$formget.created_time|default=''}" style="width: 120px;" autocomplete="off">
		<input type="submit" class="btn btn-primary" value="搜索" />
		<a class="btn btn-danger" href="{:U('EntryManager/index')}">清空</a>
	</form>
	<form method="post" class="js-ajax-form">
		<table class="table table-hover table-bordered">
			<thead>
			<tr>
				<th align="center">ID</th>
				<th>企业名称</th>
				<th>企业地址</th>
				<th>社招人名称</th>
				<th>入职人名称</th>
				<th>手机</th>
				<th>身份证</th>
				<th>录入时间</th>
				<th>最后操作时间</th>
				<th>状态</th>
				<th align="center">操作</th>
			</tr>
			</thead>
			<tbody>
			<foreach name="list" item="vo">
				<tr>
					<td align="center">{$vo.id}</td>
					<td>{$vo.com_name}</td>
					<td>
						{:F('cache_city')[$vo['province']]['name']}
						{:F('cache_city')[$vo['city']]['name']}
						{:F('cache_city')[$vo['district']]['name']}
					</td>
					<td>
						{$vo.invite_name}
					</td>
					<td>
						{$vo.person_name}
					</td>
					<td>{$vo.mobile}</td>
					<td>{$vo.card}</td>
					
					<td>{$vo.created_time|date="Y-m-d",###}</td>
					<td>
						<notempty name="vo.last_time">
							{$vo.last_time|date="Y-m-d",###}
						</notempty>
					</td>
					<td>
						{:C('PERSON_APPLY_STATE')[$vo['job_state']]['dict_text']}
					</td>
					<td align="center">
						<switch name="vo.job_state">
							<case value="1">
								<a href="{:U('EntryManager/changer_state',array('id'=>$vo['id'],'job_state'=>3))}" data-msg="确定设置为确认入职吗？" class="js-ajax-dialog-btn">确认入职</a>|
								<a href="{:U('EntryManager/changer_state',array('id'=>$vo['id'],'job_state'=>2))}" data-msg="确定设置为未录取吗？" class="js-ajax-dialog-btn">未录取</a>
							</case>
							<case value="2">
								
							</case>
							<case value="3">
								<a href="{:U('EntryManager/changer_state',array('id'=>$vo['id'],'job_state'=>4))}" data-msg="离职操作不可逆，确认离职吗？" class="js-ajax-dialog-btn">离职</a>
							</case>
							<case value="4"> 
								<a href="{:U('EntryManager/deleteByAdmin',array('id'=>$vo['id']))}" data-msg="确认删除记录吗？" class="js-ajax-dialog-btn">删除</a>
							</case>
							<default />
						</switch>
					</td>
				</tr>
			</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>